Skip to content

Conversation

@mukunku
Copy link
Collaborator

@mukunku mukunku commented Nov 17, 2025

Summary

This is for SPARK-59 and updates the Badge component styles based on the new designs.

image

This PR should only be merged after #2013 is merged as it was branched off of that branch.

Changes

The PR does the following:

  • Updates styles for Default badges
  • Removes the Badge counts section
  • Adds a new Tag badges section
  • Updates User badge designs
  • Removes xs size and replaces it with lg

What is NOT in scope for this PR:

  • Number count badges
  • Icon badges
  • Badge states
  • Filled badges
  • Cleaning up the Svelte API for the Badge component

Breaking Changes

  • xs size was removed
  • s-award-bling class was renamed to s-bling (used in some badge templates)

How to Test

Checkout the new styles in Stacks Docs and Stacks Svelte:

How to Review

I recommend excluding all .ico files in the GitHub file diff for a nice reviewing experience:

@mukunku mukunku requested a review from CGuindon November 18, 2025 20:16
@mukunku
Copy link
Collaborator Author

mukunku commented Nov 18, 2025

Thanks for the discussion @CGuindon & @dancormier! I tweaked the Bling component as we discussed based on the designs:

  • Bling component unfilled small size will be 8x8px. With the icon size 6x6px, except silver and gold which will be 7x7px
  • Bling component unfilled large and regular sizes will be 10x10px. With the icon size as 8x8px, except silver and gold which will be 9x9px.

I also added more size examples to Stacks Docs now: https://deploy-preview-2051--stacks.netlify.app/product/components/badges/#badge-sizes

Note: I find testing the different variants easier from the Svelte component side.

@CGuindon
Copy link
Collaborator

CGuindon commented Nov 18, 2025

(not fully related) I noticed if you inspect the example of s-bling (link) it has some extra broken code class in there that's not doing anything. We can delete the s-bling__
Screenshot 2025-11-18 at 1 59 52 PM
Screenshot 2025-11-18 at 2 01 35 PM

Copy link
Collaborator

@CGuindon CGuindon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this all works! Any issues I'm seeing are not related to this PR/work (issues with colors). so I'm going to approve this and move on to the next!

@giamir
Copy link
Contributor

giamir commented Nov 19, 2025

@mukunku @dancormier Should we expose the Svelte component to consumers as part of this update?
Screenshot 2025-11-19 at 09 30 43

If we are showing it in storybook we probably should exposing it in the index.ts as well I think.

Copy link
Contributor

@dancormier dancormier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on @mukunku and thanks for the bling fixes ❤️ Since many variants are yet to be designed (I saw a banner in the Figma saying "Variants below will be done separately — need additional mock ups first"), I took this opportunity to remove them from the Less for now and do a refactor (see 4132cad).

I agree w/ @giamir that we should expose the Svelte component as well to consumers. It'll need a some updates (most notably, I think "award" can be merged into "variant") but I think the changes won't be too crazy. Let me know if you'd like help with that or if you want any opinions on the API.

@mukunku mukunku requested a review from dancormier November 21, 2025 19:26
@mukunku
Copy link
Collaborator Author

mukunku commented Nov 21, 2025

Hey @dancormier , can you kindly take a look at the PR again when you get the chance?

As discussed I made the following changes:

  • Reverted your commits 🙃 (Happy to help with those changes as a follow-up 🙏🏼 )
  • Fixed font-weight issue for rep badges (thanks for catching).
  • Switched line-height from 126% to var(--lh-md) which is 128% it seems.
  • Adjusted Badge Size examples section:
    {219E5F1B-EDE5-488C-9207-D8F0CA7FDB38}

I also exposed the Badge Svelte component in index.ts as mentioned by Giamir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants